<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      /*
        属性独立，方法共享
        (规范，约定)
       */
      // 语法糖
      class Person {
        constructor() {
          this.name = "jack";
          this.age = 20;
        }
        say() {}
        add() {}
      }
      // Person.prototype.money = 1000;
      const p1 = new Person();
      const p2 = new Person();
    </script>
  </body>
</html>
